package com.bluemsun.naturallanguageprocessing.exceptionHandler;

import com.bluemsun.naturallanguageprocessing.common.ServerResponse;
import com.bluemsun.naturallanguageprocessing.exception.UserAuthoritiesException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ：hj
 * @date ：Created in 2020/11/21 23:05
 * @description：权限
 * @modified By：
 * @version: $
 */
@ControllerAdvice
public class AuthoritiesException {
    @ExceptionHandler(UserAuthoritiesException.class)
    @ResponseBody
    public ServerResponse UserAuthoritiesException(){
        return ServerResponse.createByErrorMessage("用户未登录");
    }

}
